//package com.he.hsdyc.config.mvc;
//
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.context.annotation.Configuration;
//import org.springframework.web.servlet.config.annotation.*;
//@EnableWebMvc
//@Configuration//@EnableWebMvc
//public class WebMvcConfig implements WebMvcConfigurer {
//
//    @Autowired
//    OriginInterceptor allowOriginInterceptor;
//
//    @Override
//    public void addInterceptors(InterceptorRegistry registry) {
//        registry.addInterceptor(allowOriginInterceptor).addPathPatterns("/**");
////        super.addInterceptors(registry);
//    }
//
////    @Override
////    public void addCorsMappings(CorsRegistry registry) {
////        registry.addMapping("/**")
////                .allowedOrigins("*")
////                .allowedMethods("GET", "POST", "DELETE", "PUT")
////                .allowedHeaders("Origin, Content-Type, x-requested-with, Accept ,token")
////                .maxAge(3600);
////    }
////
////    @Override
////    public void addResourceHandlers(ResourceHandlerRegistry registry) {
////        registry.addResourceHandler("swagger-ui.html").addResourceLocations("classpath:/META-INF/resources/");
////        registry.addResourceHandler("/webjars/**").addResourceLocations("classpath:/META-INF/resources/webjars/");
////        registry.addResourceHandler("/configuration/**").addResourceLocations("classpath:/springfox.documentation.swagger/");
////        super.addResourceHandlers(registry);
////    }
//
//  /*  @Bean
//    public FilterRegistrationBean myPutFilterRegistrationBean() {
//        FilterRegistrationBean registrationBean = new FilterRegistrationBean();
//        registrationBean.setName("greeting");
//        registrationBean.setFilter(corsFilter);
//        registrationBean.setOrder(1);
//        List<String> urlList = new ArrayList<String>();
//        urlList.add("/*");
//        registrationBean.setUrlPatterns(urlList);
//        return registrationBean;
//    }
//*/
//}
